package firstStage.part7;

/**
 * @ClassName: [Student1]
 * @Description: 学生类
 * @Author: [黄劲松]
 * @CreateDate: [2021-02-06]
 * @Version: [v1.0]
 */
public class Student2 {
    //成员变量
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;   //this.name 表示成员变量
        // name 表示局部变量
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void show() {
        System.out.println(name + "," + age);
    }
}
